{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "a55558f4",
   "metadata": {
    "jupyter": {
     "is_executing": true
    },
    "vscode": {
     "languageId": "java"
    }
   },
   "outputs": [],
   "source": [
    "public class y {\n",
    "public static String lem() {\n",
    "    System.out.println(\"lem\");\n",
    "    return \"return from lem\";\n",
    "}\n",
    "\n",
    "public static String foo() {\n",
    "    int x = 0;\n",
    "    int y = 5;\n",
    "    try {\n",
    "        System.out.println(\"start try\");\n",
    "        int b = y / x; // This will cause an ArithmeticException\n",
    "        System.out.println(\"end try\");\n",
    "        return \"returned from try\";\n",
    "    } catch (Exception e) {\n",
    "        System.out.println(\"catch in foo\");\n",
    "        return lem() + \"| return from catch\";\n",
    "    } finally {\n",
    "        System.out.println(\"finally in foo\");\n",
    "    }\n",
    "}\n",
    "\n",
    "public static void bar() {\n",
    "    System.out.println(\"start bar\");\n",
    "    String v = foo();\n",
    "    System.out.println(v);\n",
    "    System.out.println(\"end bar\");\n",
    "}\n",
    "\n",
    "public static void main(String[] args) {\n",
    "    bar();\n",
    "}\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c943b391f8411cea",
   "metadata": {
    "vscode": {
     "languageId": "java"
    }
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1218090a4d20bdd3",
   "metadata": {
    "vscode": {
     "languageId": "java"
    }
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Java",
   "language": "java",
   "name": "java"
  },
  "language_info": {
   "codemirror_mode": "java",
   "file_extension": ".jshell",
   "mimetype": "text/x-java-source",
   "name": "Java",
   "pygments_lexer": "java",
   "version": "11.0.12+7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
